# 实现方法：driver.implicitly_wait(timeout)
# (timeout：为等待最大时长，单位：秒)
from time import sleep
from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By

# 打开浏览器
path = r"D:\chromedriver-win64\chromedriver.exe" # 定义驱动路径
driver = webdriver.Chrome(executable_path=path)
# 2.输入访问地址
# driver.get("http://121.43.169.97:8848/pageA.html")
# 放大浏览器
driver.maximize_window()

# 设置隐式等待
driver.implicitly_wait(10)
# 输入访问路径
driver.get("http://121.43.169.97:8848/pageA.html")

# 定位用户名输入框，输入admin
driver.find_element_by_css_selector("#user").send_keys("admin")
sleep(3)
driver.quit()
